package com.wbs.rest.executor;

import com.wbs.rest.model.*;
import org.springframework.http.HttpMethod;

import java.util.Collection;
import java.util.Map;
import java.util.List;

public interface SqlExecutor {

    Object execute(SqlModel sqlModel, SqlModelEnum modelEnum, HttpMethod method) throws Exception;

    Collection select(SqlModel sqlModel);

    List<Collection> multiSelect(MultiSqlModel multiSqlModel);

    PageData selectPage(PageQuerySqlModel pageQuerySqlModel);

    Map<String, Object> selectOne(SqlModel sqlModel);

    int update(SqlModel sqlModel);

    int[] multiUpdate(MultiSqlModel multiSqlModel);

    int insert(SqlModel sqlModel);

    int[] batchInsert(BatchSqlModel batchSqlModel);

    int[] multiInsert(MultiSqlModel multiSqlModel);

    int delete(SqlModel sqlModel);

}
